<?
require("config.php");

require($rela_path . "bin/country.php");

$menutype = 2;

$location_status .= " | Add";

$show_backnav = "req_menu";

if (NULL!=$action){
   $field = array(
	"no",
	"date",
	"customer_code",
	"company",
	"title",
	"contact",
	"address",
	"zip",
	"city",
	"country",
	"tel",
	"fax",
	"email",
	"website",
	"business",
	"profile",
	);


   $content = array(
	$Code,
	$Date,
	$CustomerCode,
	$Company,
	$Title,
	$Contact,
	$Address,
	$Zip,
	$City,
	$Country,
	$Tel,
	$Fax,
	$Email,
	$Website,
	$Business,
	$Profile,
	);

   myInsert($table,$field,$content);


   header("location:" . $rela_path . "share/msg.php?v=31");

   exit();

}

if (checkNo($table,$Code)){

	header("location:" . $rela_path . "share/msg.php?v=9001");
	exit();

}

require($rela_path . "inc/header.php");

?>

<table width="95%" border="0" align="center">
  <tr> 
    <td valign="top"> 
      <div align="right"></div>

<form action="" method="post" name="form1">  

<!--hidden filed-->
<input name="action" type="hidden" value="add">
<input name="Code" type="hidden" value="<?print($Code)?>">

<table width="95%" border="0" align="center">
  <tr> 
    <td align="right">

	<input type="image" src="../../images/bt_cancel.gif" width="78" height="23" onclick="Redirect('req_menu.php',1);return false;"> 
	<input type="image" src="../../images/bt_save.gif" width="76" height="22"> 

    </td>
  </tr>
</table>

        <table border="0" cellspacing="0" cellpadding="2">
          <tr> 
            <td class="tdheader">No :</td>
            <td> <input type="text" class="text" name="No" value=<?print($Code)?> DISABLED> </td>
          </tr>
          <tr> 
            <td class="tdheader">Date :</td>
            <td> <input type="text" class="text" name="Date" value=<?print(date("Y-m-d"))?>> </td>
          </tr>
          <tr> 
            <td class="tdheader">Customer Code :</td>
            <td> <input type="text" class="text" name="CustomerCode"> <input type="button" class="button" name="Submit22" value="..." onClick="Redirect('<?print($rela_path)?>listing/customer_list.php',2)"> 
            </td>


          </tr>
          <tr> 
            <td height="3" class="tdheader">Company :</td>
            <td height="3"> <input type="text" class="text" name="Company" size="55" value=""> 
            </td>
          </tr>
          <tr> 
            <td class="tdheader">Contact Person :</td>
            <td> <input type="radio" name="Title" value="Mr." checked>
              Mr 
              <input type="radio" name="Title" value="Ms.">
              Ms 
              <input type="radio" name="Title" value="Mrs.">
              Mrs<br> <input type="text" class="text" name="Contact" size="55" value=""> 
            </td>
          </tr>
          <tr> 
            <td class="tdheader">Address :</td>
            <td> <textarea class="text" name="Address" cols="40" rows="5"></textarea> 
            </td>
          </tr>
          <tr> 
            <td class="tdheader">Zip Code :</td>
            <td> <input type="text" class="text" name="Zip" size="55" value=""> 
            </td>
          </tr>
          <tr> 
            <td height="25" class="tdheader">City :</td>
            <td height="25"> <input type="text" class="text" name="City" size="55" value=""> 
            </td>
          </tr>
          <tr> 
            <td class="tdheader">Country : </td>
            <td><?print(FFPCountry("US"))?>	  </td>
          </tr>
          <tr> 
            <td class="tdheader">Tel :</td>
            <td> <input type="text" class="text" name="Tel" size="55" value=""> 
            </td>
          </tr>
          <tr> 
            <td class="tdheader">Fax :</td>
            <td> <input type="text" class="text" name="Fax" size="55" value=""> 
            </td>
          </tr>
          <tr> 
            <td class="tdheader">Email :</td>
            <td> <input type="text" class="text" name="Email" size="55" value=""> 
            </td>
          </tr>
          <tr> 
            <td class="tdheader">Website :</td>
            <td> <input type="text" class="text" name="Website" size="55" value=""> 
            </td>
          </tr>
          <tr> 
            <td class="tdheader">Nature of Business :</td>
            <td> <input type="text" class="text" name="Business" size="55" value=""> 
            </td>
          </tr>
          <tr> 
            <td class="tdheader">Profile :</td>
            <td> <textarea class="text" name="Profile" cols="40" rows="5"></textarea> 
            </td>
          </tr>
        </table>
<br><br><br>
<table width="95%" border="0" align="center">
  <tr> 
    <td align="right">

	<input type="image" src="../../images/bt_cancel.gif" width="78" height="23" onclick="Redirect('req_menu.php',1);return false;"> 
	<input type="image" src="../../images/bt_save.gif" width="76" height="22"> 

    </td>
  </tr>
</table>


</form>
<!--
        <hr> <br>
      <form name="form2" method="post" action="">
        <table border="0" cellspacing="1" cellpadding="3">
          <tr> 
            <td width="20%"><u><b>Sub Item</b></u></td>
            <td width="80%">&nbsp;</td>
          </tr>
          <tr> 
            <td width="20%">Product Code :</td>
            <td width="80%"> <input type="text" class="text" name="ProductCode"> 
              <input type="submit" class="button" name="Submit2" value="..."> 
            </td>
          </tr>
          <tr> 
            <td width="20%">Unit Price : </td>
            <td width="80%"> <input type="text" class="text" name="Price"> </td>
          </tr>
          <tr> 
            <td width="20%">Qty :</td>
            <td width="80%"> <input type="text" class="text" name="Qty"> </td>
          </tr>
          <tr> 
            <td width="20%">&nbsp;</td>
            <td width="80%"> <input type="submit" class="button" name="Submit3" value="Add to List"> 
            </td>
          </tr>
        </table>
      </form>
      <br> 
        <table border="0" cellspacing="1" cellpadding="0" class="tb">
          <tr bgcolor="#CCCCCC"> 
            <td width="3%"> <div align="center">No.</div></td>
            <td width="16%"> <div align="center">Product Code</div></td>
            <td width="43%"> <div align="center">Product Name</div></td>
            <td width="10%"> <div align="center">Unit Price</div></td>
            <td width="10%"> <div align="center">Qty</div></td>
            <td width="18%"> <div align="center">Amount</div></td>
            <td width="18%">&nbsp;</td>
          </tr>
          <tr> 
            <td width="3%">1</td>
            <td width="16%">ab102-222-23</td>
            <td width="43%">Basic Jean</td>
            <td width="10%"> <div align="right">99.00</div></td>
            <td width="10%"> <div align="right">100</div></td>
            <td width="18%"> <div align="right">9,900.00</div></td>
            <td width="18%"> <div align="center"><a href="#">edit</a> <a href="#">delete</a></div></td>
          </tr>
          <tr> 
            <td width="3%">&nbsp;</td>
            <td width="16%">&nbsp;</td>
            <td width="43%">&nbsp;</td>
            <td width="10%">&nbsp;</td>
            <td width="10%">&nbsp;</td>
            <td width="18%">&nbsp;</td>
            <td width="18%">&nbsp;</td>
          </tr>
          <tr> 
            <td width="3%">&nbsp;</td>
            <td width="16%">&nbsp;</td>
            <td width="43%">&nbsp;</td>
            <td width="10%">&nbsp;</td>
            <td width="10%">&nbsp;</td>
            <td width="18%">&nbsp;</td>
            <td width="18%">&nbsp;</td>
          </tr>
          <tr> 
            <td width="3%">&nbsp;</td>
            <td width="16%">&nbsp;</td>
            <td width="43%">&nbsp;</td>
            <td width="10%">&nbsp;</td>
            <td width="10%">&nbsp;</td>
            <td width="18%">&nbsp;</td>
            <td width="18%">&nbsp;</td>
          </tr>
          <tr> 
            <td width="3%">&nbsp;</td>
            <td width="16%">&nbsp;</td>
            <td width="43%">&nbsp;</td>
            <td width="10%">&nbsp;</td>
            <td width="10%">&nbsp;</td>
            <td width="18%">&nbsp;</td>
            <td width="18%">&nbsp;</td>
          </tr>
          <tr> 
            <td width="3%">&nbsp;</td>
            <td width="16%">&nbsp;</td>
            <td width="43%">&nbsp;</td>
            <td width="10%">&nbsp;</td>
            <td width="10%">&nbsp;</td>
            <td width="18%">&nbsp;</td>
            <td width="18%">&nbsp;</td>
          </tr>
          <tr> 
            <td width="3%">&nbsp;</td>
            <td width="16%">&nbsp;</td>
            <td width="43%">&nbsp;</td>
            <td width="10%">&nbsp;</td>
            <td width="10%">&nbsp;</td>
            <td width="18%">&nbsp;</td>
            <td width="18%">&nbsp;</td>
          </tr>
          <tr> 
            <td width="3%">&nbsp;</td>
            <td width="16%">&nbsp;</td>
            <td width="43%">&nbsp;</td>
            <td width="10%">&nbsp;</td>
            <td width="10%">&nbsp;</td>
            <td width="18%">&nbsp;</td>
            <td width="18%">&nbsp;</td>
          </tr>
          <tr> 
            <td width="3%">&nbsp;</td>
            <td width="16%">&nbsp;</td>
            <td width="43%">&nbsp;</td>
            <td width="10%">&nbsp;</td>
            <td width="10%">&nbsp;</td>
            <td width="18%">&nbsp;</td>
            <td width="18%">&nbsp;</td>
          </tr>
          <tr> 
            <td colspan="7"><div align="right">Total Amount : 9,900.00</div></td>
          </tr>
        </table>
-->        
      </td>

  </tr>
</table>

<br>
<br>
<br>
<?
require($rela_path . "inc/footer.php");
?>
